package com.company.enumtest;

/**
 * 枚举测试 valueOf 方法测试
 **/
public enum Color implements BasicEnum<String,Integer>{
    RED("a",0),
    GREEN("b",1),
    BLUE("c",2);

    private final String name;
    private final Integer value;

    Color(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public Integer getValue() {
        return this.value;
    }

    public static void main(String[] args) {
        System.out.println(Color.valueOf("RED").getValue());
    }
}
